home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / scope / 151-175 / scopedisk168 / serial / strcmpu.c < prev    next >
Text File  |  1995-03-19  |  475b  |  19 lines

  1. /************************************************************************/
  2. int strcmpu( s, t )
  3. /* returns: -1 is s < t
  4.              0 if s = t
  5.              1 if s > t
  6.             without regard to case */
  7. char s[], t [] ;
  8. {
  9.    int i;
  10.    i = 0 ;
  11.    while( toupper(s[i]) == toupper(t[i]) ) {
  12.      if( s[i++] == '\0' ) {
  13.         return( 0 ) ;
  14.      }
  15.    } 
  16.    return( toupper(s[i]) - toupper(t[i]) ) ;
  17. }
  18. /************************************************************************/
  19.